seo

First Touch Tracking in Google Analytics

It’s time for a quick mid-week geek-out – I wanted to collect together a bunch of resources I have written on first touch tracking in Google Analytics including (for the first time that I’m aware of), the technical implementation details:

If you’re the kind of person that unwraps your birthday presents early, you can skip to the punchline, grab the code you need to get first touch tracking working from Google code (don’t forget to read the instructions!). Here’s the meat from my detailed post:

Include following code anywhere above the Google Analytics code script in your page code:

Move your GA code above any Website Optimizer code or anything from Google that might write a visitor (__utma) cookie and look for:

var pageTracker = _gat._getTracker("UA-XXXXXXX-X");

pageTracker._trackPageview();

In between those two lines, you want to put the following line:

distilledFirstTouch(pageTracker);

Oh, and don’t forget all of this is provided as is, with no warranty. I hope it will help you out, but only you are responsible for changes you make to your website and tracking code. Be extremely careful with live profiles and remember that you will need to do something different if you already use custom variables.

That’s all for now folks. Enjoy your analytics, don’t forget to drop comments with improvements, tips, tricks, abuse for writing such a short post etc. and if you need a primer on Excel to make the most of your new-found data, you can check out the recording of my conference call on how to be an Excel ninja (sign up for future calls here).


To distract you from this spectacularly short post, here are some really big things found on the internet this week:

Check out the depth of the ocean:

Ocean depth

As well as the size of the earth:

I also recommend watching this one.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button